package com.easy.dialog;

import android.app.Dialog;
import android.content.Context;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import com.easy.R;

public class ChooseDialog extends Dialog {
    private String tag = "ChooseDialog";
    TextView tvn;
    Button bt1;
    Button bt2;
    private PriorityListener listener;
    private Context mContext;
    private String mTitle;

    public interface PriorityListener {
        void setActivityText();
    }

    public ChooseDialog(final Context context, String title, int theme, PriorityListener priorityListener) {
        super(context, theme);
        mTitle = title;
        mContext = context;
        listener = priorityListener;
        setContentView(R.layout.dialog_c);
        tvn = (TextView) findViewById(R.id.tvn);
        bt1 = (Button) findViewById(R.id.bt1);
        bt2 = (Button) findViewById(R.id.bt2);
        tvn.setText(mTitle);
        bt2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                dismiss();
            }
        });
        bt1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                dismiss();
                listener.setActivityText();
            }
        });
    }
}


